<div class="row margin-0">
	<div class="col-md-12 col-sm-12 col-xs-12">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">列表</h3>
			</div>
			<div class="panel-body list-container">
				<table class="table table-bordered table-hover table-striped table-condensed">
					<tr>
						<th  width="40">序号</th>
						<th  class="text-center">文件题名</th>
						<th width="200" class="text-center">拟稿人</th>
						<th width="100"  class="text-center">拟稿日期</th>
					</tr>
					<#if data??> <#list data as d>
					<tr>
						<td class="text-center">${d_index+1}</td>
						<td><a href="appfw/forminfo/${d.id}.do" target="_blank">${(d.title)!'&lt;没有标题&gt;'}</td>
						<td align="center">${d.creatorShortName}</td>
						<td>
							${((d.createTime)?string('yyyy-MM-dd'))!""}</a>
						</td>
					</tr>
					</#list> </#if>
				</table>
			</div>
		</div>
	</div>
	<div class="col-md-12 col-sm-12 col-xs-12">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">
					列表数据
					<div class="btn btn-xs btn-danger pull-right redo">重绘</div>
				</h3>
			</div>
			<div class="panel-body list-data padding-0" contenteditable="true" style="height: 550px; overflow: auto;">
				<pre class="margin-0" style="border: none;">
	{
		header : true,
		footer : true,
		search : true,
		checkbox : true,
		title : undefined,
		searchDefaultText : '输入查询关键字',
		searchFieldName : 'search',
		pageFieldName : 'page',
		pageSizeFieldName : 'pageSize',
		paginate : function(page, pageSize, key) {
			alert('page: ' + page + ' -- pageSize: ' + pageSize + ' -- searchKey: ' + key);
		},
		btns : [ {
			text : '按钮1',
			icon : 'icon-user',
			style : 'btn-default',
			click : function(page, pageSize, key) {
				alert('this is button 1');
			}
		}, {
			text : '按钮组2',
			icon : 'icon-key',
			style : 'btn-primary',
			click : function(page, pageSize, key) {
				alert('this is button 2.');
			},
			children : [ {
				text : '子按钮1',
				icon : 'icon-user',
				click : function(page, pageSize, key) {
					alert('this is a child button 1');
				}
			}, {
				split : true
			}, {
				text : '子按钮2',
				//icon : 'icon-key',
				click : function(page, pageSize, key) {
					alert('this is a child button 2');
				}
			} ]
		}, {
			text : '按钮3',
			style : 'btn-danger',
			click : function(page, pageSize, key) {
				alert('this is button 3.');
			}
		} ]
	}
				</pre>
			</div>
		</div>
	</div>
</div>
<script src="${request.contextPath}/js/suredy-list.js"></script>
<script type="text/javascript">
	$(function() {
		var table = $('.list-container').html();

		$('div.btn.redo').on('click', function() {
			$('.list-container').html(table);

			var data = eval('(' + $('.list-data pre').html() + ')');

			$('.my-list').list(data);
			
			console.log($.suredy.list.checked($('.my-list')));
		});

		$('div.btn.redo').trigger('click');
	});
</script>















<div class="container-fluid">
	<div class="panel panel-default">
		<div class="panel-heading">
			<div class="btn-group new-btn-group">
				<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
					<i class="icon-plus"></i>
					新建发文
					<span class="caret"></span>
				</button>
				<ul class="dropdown-menu" role="menu">
					<li>
						<a href="#" data-uri="appfw/new.do">公司发文</a>
					</li>
				</ul>
			</div>
		</div>
		<table class="table table-bordered table-hover table-striped table-condensed">
			<tr>
				<th  width="40">序号</th>
				<th  class="text-center">文件题名</th>
				<th width="200" class="text-center">拟稿人</th>
				<th width="100"  class="text-center">拟稿日期</th>
			</tr>
			<#if data??> <#list data as d>
			<tr>
				<td class="text-center">${d_index+1}</td>
				<td><a href="appfw/forminfo/${d.id}.do" target="_blank">${(d.title)!'&lt;没有标题&gt;'}</td>
				<td align="center">${d.creatorShortName}</td>
				<td>
					${((d.createTime)?string('yyyy-MM-dd'))!""}</a>
				</td>
			</tr>
			</#list> </#if>
		</table>
		<div class="panel-footer">
			<ul class="pager" style="margin: 0;">
				<li class="${pageInfo.first?string('disabled','')}">
					<a href="#" class="suredy-paging-pre">上一页</a>
				</li>
				<li>当前第 ${(page)!''} 页，共 ${(pageInfo.pages)!''} 页</li>
				<li class="${pageInfo.last?string('disabled','')}">
					<a href="#" class="suredy-paging-next">下一页</a>
				</li>
			</ul>
		</div>
</div>
<script src="js/suredy-list.js"></script>